<template>
	<view>
		<stop isBack>
			<view slot="content">岗位明细</view>
		</stop>
		<stab :names="['基本信息','考核项目']" v-model="myCurTab"></stab>
		<view v-if="isbool(entity) && myCurTab == 0">
			
			<view class="bcf mart3 pad3">
				<view class="list-style-1">岗位名称</view>
				<view class="pad2">{{entity.name}}</view>
			</view>
			<view class="bcf mart3 pad3">
				<view class="list-style-1">直接上级</view>
				<view class="pad2">{{entity.manageBy.name}}</view>
			</view>
			<view class="bcf mart3 pad3" v-show="entity.managedJobs.length > 0">
				<view class="list-style-1">管理考核</view>
				<view class="pad2 flex-r flex-start">
					<view class="cu-btn line-cyan sm marr2" v-for="item in entity.managedJobs" :key="item.id">
						{{item.name}}
					</view>
				</view>
			</view>
			<view class="bcf mart3 pad3">
				<view class="list-style-1">主要职责</view>
				<view class="pad2 lh2">
					<view v-html="entity.description"></view>
				</view>
			</view>
			<view class="bcf mart3 pad3">
				<view class="list-style-1">详细职责</view>
				<view class="pad2 lh2">
					<view v-html="entity.duty"></view>
				</view>
			</view>
		</view>
		<view v-if="isbool(entity) && myCurTab == 1">
			<view class="pad3 mart3 bcf" v-for="item in entity.points">
				<view class="padtb2 fwb fs12">
					{{item.title}}
				</view>
				<view class="list-style-1 mart3">评分标准</view>
				<view class="bdda pad2 mart3" v-for="choiceArr in item.choices">
					<view class="list-style-2">
						<text class="fwb marr2"> ( 分值：{{choiceArr[1]}} ) </text>
						<text> {{choiceArr[0]}}</text>
					</view>
					<!-- <view>得分：</view> -->
				</view>
				<view class="list-style-1 mart5">指标要求</view>
				<view class="bc13 pad3 mart2 round3 lh2">
					<view v-html="item.reference"></view>
				</view>
				<view class="list-style-1 mart5">参考资料</view>
				<view class="pad3 mar3 tac bdda round3" v-show="item.links.length == 0">暂无参考资料</view>
				<view class="bdda pad2 mart3" v-for="link in item.links">
					<view class="list-style-2">
						
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				entity:''
			}
		},
		methods: {
			
		},
		onLoad(option) {
			this.$api.get('/api/jobs/' + option.id,{
				_g:['job',"full"]
			},res=>{
				this.log(res)
				this.entity = res.d
			})
		}
	}
</script>

<style>

</style>
